// 这个文件统一管理咱们之后用到的所有的请求(接口函数)

import ajax from "./ajax.js";
// 这是请求三级分类的接口函数

// 获取猜你喜欢的图片列表
export const reqDetailData = (id) => ajax({ url: `/detailList/${id}`, method: "get" });

// 修改数量
export const reqUpdateDetailData = (id, params) => ajax({ url: `/detailList/${id}`, method: "patch", data: params });

// 获取省份的接口
export const reqGetProvince = () => ajax({ url: "/provinceAddress", method: "get" });

// 获取市的接口
export const reqGetCity = (id) => ajax({ url: `/cityAddress/${id}`, method: "get" });

// 获取缩略图的
// export const reqLbImageList = () =>
//   ajax({ url: "/lbImageList", method: "get" });
// 获取分类的接口函数
export const getCategory = () => ajax({ url: "/categorylist", method: "get" });
// 搜索推荐logo
export const searchRecommend = () =>
  ajax({ url: "/searchRecommend", method: "get" });
// 获取省份
export const getProvince = () => ajax({ url: "/getProvince", methods: "get" });
// 获取分类页商品
export const categoryGoods = () =>
  ajax({ url: "/categoryGoods", methods: "get" });

// 获取热销榜数据
export const gethotSaleList = () => ajax({ url: "/hotsale", method: "get" });

//获取新品首发数据
export const getnewproduct = () => ajax({ url: "/newproduct", method: "get" });

//获取人气推荐列表
export const getRecommendlist = () =>
  ajax({ url: "/Recommend", method: "get" });

//获取分类介绍列表
export const getClassificationList = () =>
  ajax({ url: "/Classification", method: "get" });

// 分类页需要的商品数据
export const reqGetDetailList = () =>
    ajax({ url: "/detailList", method: "get" });